package cn.gxa.j229.bug.finance.service.loanuser.impl;

import cn.gxa.j229.bug.finance.mapper.AuditMapper;
import cn.gxa.j229.bug.finance.pojo.Audit;
import cn.gxa.j229.bug.finance.service.loanuser.AuditService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author: fenglin
 * @Date:2020/9/27 17:20
 * @Version 1.0
 */
@Service("AuditService")
public class AuditServiceImpl implements AuditService {

    @Resource
    AuditMapper auditMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(Audit record) {
        return auditMapper.insert(record);
    }

    @Override
    public int insertSelective(Audit record) {
        return 0;
    }

    @Override
    public Audit selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(Audit record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Audit audit) {

        return auditMapper.updateByPrimaryKey(audit);
    }

    @Override
    public List<Map<String, String>> selectAll(Audit audit) {
        audit.setPage((audit.getPage()-1)*audit.getLimit());
        return auditMapper.selectAll(audit);
    }

    @Override
    public int selectAllCount(Audit audit) {

        return auditMapper.selectAllCount(audit);
    }

    @Override
    public List<Map<String, String>> selectKey(Audit audit) {
        audit.setPage((audit.getPage()-1)*audit.getLimit());
        return auditMapper.selectKey(audit);
    }

    @Override
    public int selectKeyCount(Audit audit) {
        return auditMapper.selectKeyCount(audit);
    }
}
